<template>
  <div class="bind-item">
    <div class="item-content">
      <div>
        <i
          :class="icon"
          class="item-icon"
        ></i>
      </div>
      <div class="item-info">
        <div class="item-name">
          {{title}}
          <span class="item-status">{{status}}</span>
        </div>
        <div class="item-intro">
          {{subTitle}}
        </div>
      </div>
    </div>
    <div>
      <div class="item-ctrl" @click="$emit('click')">
        {{ctrl}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BindItem',
  props: {
    icon: {
      type: String,
      default: 'el-icon-mic'
    },
    title: {
      type: String,
      default: '麦克风'
    },
    status: {
      type: String,
      default: '已测试'
    },
    subTitle: {
      type: String,
      default: '用于提供更优质的音视频会议服务'
    },
    ctrl: {
      type: String,
      default: '正常'
    }
  }
}
</script>

<style lang="scss" scoped>
.bind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  border-bottom: 1px solid #d0d6d9;
  padding: 0 40px;
  .item-content {
    .item-icon {
      font-size: 25px;
      margin-right: 20px;
      color: #545c63;
    }
    display: flex;
    align-items: center;
    .item-name {
      font-size: 16px;
      font-weight: 700;
      color: #2b333b;
      .item-status {
        font-size: 13px;
        font-weight: normal;
        color: #2b333b;
      }
    }
    .item-intro {
      font-size: 14px;
      color: #535b68;
    }
  }
  .item-ctrl {
    height: 40px;
    line-height: 40px;
    width: 80px;
    text-align: center;
    border-radius: 20px;
    border: 1px solid #7c8790;
    font-size: 16px;
    cursor: pointer;
    color: #7c8790;
    &:hover {
      color: #2d3135;
      border-color: #2d3135;
    }
    & + .item-ctrl {
      margin-left: 10px;
    }
  }
}
</style>
